package bupt.party.online.model;

import java.sql.Timestamp;

import bupt.party.online.service.IAdminService;
import bupt.party.online.service.impl.AdminServiceImpl;

/**
 * PartyNews entity. @author MyEclipse Persistence Tools
 */

public class PartyNews implements java.io.Serializable {

	// Fields
	
	private Integer id;
	private String picPath;
	private String title;
	private String posterNo;
	private String modifyNo;
	private Timestamp postTime;
	private Timestamp modifyTime;
	private String content;
	private Integer tag;
	private Integer picTag;
	private Integer isDelete;
	private Integer visitedCount;
	private Integer branchId;
	
	public static int Category_spirit_news = 1;
	public static int Category_school_news = 2;
	public static int Category_college_news = 3;
	
	public static int Picture_news = 1;
	// Constructors

	/** default constructor */
	public PartyNews() {
	}

	/** minimal constructor */
	public PartyNews(Integer picTag, Integer isDelete) {
		this.picTag = picTag;
		this.isDelete = isDelete;
	}

	/** full constructor */
	public PartyNews(String picPath, String title, String posterNo,
			Timestamp postTime, String modifyNo, Timestamp modifyTime,
			String content, Integer tag, Integer picTag, Integer isDelete) {
		this.picPath = picPath;
		this.title = title;
		this.posterNo = posterNo;
		this.postTime = postTime;
		this.modifyNo = modifyNo;
		this.modifyTime = modifyTime;
		this.content = content;
		this.tag = tag;
		this.picTag = picTag;
		this.isDelete = isDelete;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getPicPath() {
		return this.picPath;
	}

	public void setPicPath(String picPath) {
		this.picPath = picPath;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPosterNo() {
		return this.posterNo;
	}

	public void setPosterNo(String posterNo) {
		this.posterNo = posterNo;
	}

	

	public String getModifyNo() {
		return this.modifyNo;
	}

	public void setModifyNo(String modifyNo) {
		this.modifyNo = modifyNo;
	}

	public Timestamp getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}


	public Timestamp getPostTime() {
		return postTime;
	}

	public void setPostTime(Timestamp postTime) {
		this.postTime = postTime;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getTag() {
		return this.tag;
	}

	public void setTag(Integer tag) {
		this.tag = tag;
	}

	public Integer getPicTag() {
		return this.picTag;
	}

	public void setPicTag(Integer picTag) {
		this.picTag = picTag;
	}

	public Integer getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}
	
	public Integer getVisitedCount() {
		return visitedCount;
	}

	public void setVisitedCount(Integer visitedCount) {
		this.visitedCount = visitedCount;
	}

	public Integer getBranchId() {
		return branchId;
	}

	public void setBranchId(Integer branchId) {
		this.branchId = branchId;
	}

	public static String getNewsCategory(int category){
		String newsCategory = "";
		switch(category){
			case 1: newsCategory = "上级精神";break;
			case 2: newsCategory = "学校要闻";break;
			case 3: newsCategory = "院系风采";break;
		}
		return newsCategory;
	}
	
}